define(["easy-admin"], function (ea) {

    return {
        index: function () {
            if (top.location !== self.location) {
                top.location = self.location;
            }
            $(document).on('click','.user-table__tr',function () {
                let dataKey = $(this).attr('data-key');
                let __token = $('#easy_token').val();
                let __scope = $('#easy_scope').val();
                let __scopeKey = $('#__scope-key').val();
                ea.request.get({url: 'auth/authuser', prefix: true, data: {
                        'dataKey':dataKey,
                        'token': __token,
                        'scope': __scope,
                        'scope_key': __scopeKey
                    }}, function (res) {
                    ea.msg.success(res.msg);
                    location.href = res.url;
                }, function (error) {

                })
            });
        },
    };
});
